import {host} from '../config'
import http from '../utils/http'

export const chatAPI = {
  // 获取聊天信息
  getChatList() {
    return http.get(`${host}/chat`)
  },

  // 获取聊天信息
  getChatItem({ partnerId }) {
    return http.get(`${host}/chat/${partnerId}`)
  },

  searchUser({ searchKey }) {
    return http({
      url: `${host}/chat/search-user`,
      data: {
        searchKey
      }
    })
  }
}
